package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class StreamSelectionConfig  implements Sequenceable, Serializable {

    @SerializedName("maxBitrate")
    private String maxBitrate;

    public static final Sequenceable.Producer<StreamSelectionConfig> CREATOR = new Producer<StreamSelectionConfig>() {
        @Override
        public StreamSelectionConfig createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            StreamSelectionConfig streamSelectionConfig = new StreamSelectionConfig();
            streamSelectionConfig.unmarshalling(parcel);
            return streamSelectionConfig;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.maxBitrate);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.maxBitrate=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "StreamSelectionConfig{" +
                "maxBitrate='" + maxBitrate + '\'' +
                '}';
    }

    public String getMaxBitrate() {
        return maxBitrate;
    }

    public void setMaxBitrate(String maxBitrate) {
        this.maxBitrate = maxBitrate;
    }
}
